Skip to content

Conversation

@Tarquinen
Copy link
Contributor

Summary

  • Filter out messages with empty parts arrays before sending to provider API

Problem

Related to #2655

Messages with only ignored: true text parts pass the initial parts.length === 0 check but end up with empty content after filtering, causing provider API errors:

messages.X: all messages must have non-empty content except for the optional final assistant message

Solution

Filter messages with empty parts after processing, before convertToModelMessages().

@rekram1-node rekram1-node merged commit 13f89fd into anomalyco:dev Nov 28, 2025
2 of 3 checks passed
shuv1337 pushed a commit to Latitudes-Dev/shuvcode that referenced this pull request Nov 29, 2025
@Tarquinen Tarquinen deleted the fix/filter-empty-messages branch December 16, 2025 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants